<?php $rows = round(count($guest_special_dates) / 2) ?>
<div>
    <?php for ($i = 0; $i < $rows; $i++): ?>
    <div>
    <?php //TODO: Hartger - add calendar picker event here.; ?>
    	<a onclick="if (event.preventDefault) {event.preventDefault()} else {event.returnValue = false; }; $('#reservation_backoffice_date').val('<?php echo date('d/m/Y', strtotime($guest_special_dates[$i * 2]['date'])); ?>'); checkBlocks();">
            <span 
            	 class="ui-button ui-widget ui-state-active ui-corner-all ui-button-text-only yvo-smallbutton yvo-spdatebutton"             	
            	>
                <span class="ui-button-text yvo-smalltext">    
                    <?php echo $guest_special_dates[$i * 2]['description'] ?><br />
                    <span style="font-size: 0.85em"><?php echo format_date($guest_special_dates[$i * 2]['date'], 'p', 'nl') ?></span>
                </span>
            </span>				
        </a>

        <?php if (isset($guest_special_dates[$i * 2 + 1])): ?>
        <a onclick="if (event.preventDefault) {event.preventDefault()} else {event.returnValue = false; }; $('#reservation_backoffice_date').val('<?php echo date('d/m/Y', strtotime($guest_special_dates[$i * 2 + 1]['date'])); ?>'); checkBlocks();">
            <span  class="ui-button ui-widget ui-state-active ui-corner-all ui-button-text-only yvo-smallbutton yvo-spdatebutton">             
                <span class="ui-button-text yvo-smalltext">    
                    <?php echo $guest_special_dates[$i * 2 + 1]['description'] ?><br />
                    <span style="font-size: 0.85em"><?php echo format_date($guest_special_dates[$i * 2 + 1]['date'], 'p', 'nl') ?></span>
                </span>
            </span>				
        </a>        
        <?php endif ?>
    </div>
    <?php endfor ?>
</div>
